 request('https://tondar.org/index.php', 'GET', getListener);

function request(url, type, callback, send){
      var oReq = new XMLHttpRequest();
      oReq.open(type, url, true);
      oReq.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
      oReq.onload = callback;
      oReq.send(send);
};
  
function getListener () {
      var el = document.createElement('div');
      el.innerHTML = this.responseText;
      var csrf_token = el.querySelector('input[name="s"]').value;
	  cont(csrf_token);
};

  
function cont (val) {
	alert(val)
};